/**
 * @Author: 焦质晔
 * @Date: 2019/6/20
 * @Last Modified by: mikey.zhaopeng
 * @Last Modified time: 2019-12-15 15:21:28
 */
import axios from '@/api/fetch';
import SERVER from '@/api/server';

// 列表查询
export const getList = (params) => axios.post(`${SERVER.RETAIL}/ttVsAllocateApply/queryAllocateApply`, params)
// 查询详情
export const getDetail = (params) => axios.get(`${SERVER.RETAIL}/ttVsAllocateApply/queryAllocateApplyDetail`, {
  params
})
// 新增
export const insertAllocateApply = (params) => axios.post(`${SERVER.RETAIL}/ttVsAllocateApply/insertAllocateApply`, params)
//提交
export const updateAllocateApply = (params) => axios.put(`${SERVER.RETAIL}/ttVsAllocateApply/updateAllocateApply`, params)
//导出
export const exportList = (params) => axios.post(`${SERVER.RETAIL}/ttVsSubsidyApply/subsidyApplyExportExcel`, params, {
  responseType: 'blob'
})
// 车辆配置五级选择
export const vehicleConfiguration = (id, params) => axios.get(`${SERVER.BASEDATA}/vehicleProduct/productInfo/productTreeNew`, {
  params: {
    type: id,
    level: 6,
    ...params
  }
});
// 导入
export const FromExcel = (params) => axios.post(`${SERVER.RETAIL}/ttVsAllocateApply/certificatePostImportFromExcel`, params)
// 车辆列表
export const getCarList = (params) => axios.get(`${SERVER.RETAIL}/ttVsAllocateApply/queryVehicle`, {
  params
})
// 仓库选择列表
export const getWarehouseList = (params) => axios.get(`${SERVER.RETAIL}/ttVsDeliveryOrder/getWarehouseList`, {
  params
})
